<?php
/*********************************************************************************
easyZenImport v.8b - Easy, Ajax Driven Importing Front-End For EasyPopulate 
Copyright (C) 11-02-06 Nick Van Dorsten
Author: Nick Van Dorsten <nickvd@gmail.com>

This library is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or (at your option) any later
version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
*********************************************************************************/

define('ZENCART_PATH','/var/www/forks/zencart/'); // ABSOLUTE path to your Zen Cart Installation

/************************************************************************
********* DON'T CHANGE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING *********
*************************************************************************/
error_reporting(E_ALL);
require_once('debuglib.php');
session_start();
define('IS_ADMIN_FLAG',true);
require_once('easyimport.fn.php');
require_once('upload.class.php');
if (!function_exists('file_put_contents')) require_once('file_put_contents.php');
require_once(ZENCART_PATH.'admin/includes/configure.php');
require_once(ZENCART_PATH.'includes/database_tables.php');
require_once(ZENCART_PATH.'includes/classes/class.base.php');
require_once(ZENCART_PATH.'includes/classes/db/mysql/query_factory.php');

$up = new imageResize;
$PKI = array('PRODUCTS_MODEL' => 0,  'PRODUCTS_IMAGE' => 1,'PRODUCTS_NAME' => 2,'PRODUCTS_DESCRIPTION' => 3,'PRODUCTS_URL' => 4,'PRODUCTS_PRICE' => 5,'PRODUCTS_WEIGHT' => 6,'DATE_AVAIL' => 7,'DATE_ADDED' => 8,'PRODUCTS_QUANTITY' => 9,'MANUFACTURERS_NAME' => 10,'CATEGORIES_NAME_1' => 11,'CATEGORIES_NAME_2' => 12,'CATEGORIES_NAME_3' => 13,'CATEGORIES_NAME_4' => 14,'CATEGORIES_NAME_5' => 15,'CATEGORIES_NAME_6' => 16,'CATEGORIES_NAME_7' => 17,'TAX_CLASS_TITLE' => 18,'STATUS' =>19,'EOREOR' => 20);
$PKM = array('PRODUCTS_MODEL','PRODUCTS_IMAGE','PRODUCTS_NAME','PRODUCTS_DESCRIPTION','PRODUCTS_URL','PRODUCTS_PRICE','PRODUCTS_WEIGHT','DATE_AVAIL','DATE_ADDED','PRODUCTS_QUANTITY','MANUFACTURERS_NAME','CATEGORIES_NAME_1','CATEGORIES_NAME_2','CATEGORIES_NAME_3','CATEGORIES_NAME_4','CATEGORIES_NAME_5','CATEGORIES_NAME_6','CATEGORIES_NAME_7','TAX_CLASS_TITLE','STATUS','EOREOR');
$db = new queryFactory();
$db->connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD,DB_DATABASE);
if ($db->link === false) die('No database connectivity, please re-check your configuration...');
?>